﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Users_MasterPage : System.Web.UI.MasterPage
{
    private string _usercode;
    public string UserCode
    {
        set { _usercode = value; }
        get { return _usercode; }
    }
    private string _nickname;
    public string NickName
    {
        set { _nickname = value; }
        get { return _nickname; }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (HttpContext.Current.User.Identity.IsAuthenticated)
        {
            UserCode = BasePage.GetValue(0);
            Model.V_CUSTOMER customer = new BLL.V_CUSTOMER().GetModel(UserCode);
            NickName = customer.BYZD5;
            Login.Visible = true;
            NoLogin.Visible = false;
        }
        else
        {
            Login.Visible = false;
            NoLogin.Visible = true;
        }

    }
    protected void Link_exit_Click(object sender, EventArgs e)
    {
        FormsAuthentication.SignOut();
    }
}
